Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Appliance implementation #51286

Merged
merged 14 commits into from
Oct 25, 2021
Merged

Conversation

Fris0uman
Copy link
Contributor

@Fris0uman Fris0uman commented Sep 1, 2021

Summary

Infrastructure "Basic Appliance implementation"

Purpose of change

Does this #28289

Describe the solution

  • Add APPLIANCE flag
  • can't install APPLIANCE parts on normal vehicles
  • "vehicle" with at least one APPLIANCE is an appliance
  • aplliances don't get the vehicle menu, but do get the normal uilist vehicle parts have to control electronics and start washing machines
  • Appliances have the "Plug appliance" option that spawn a power cord that you can plug into any nearby vehicle
    - You can plug into an infinity of other vehicle
    - the power cord can't be uninstalled and doesn't drop when the vehicle is destroyed or move away, but it does disconnect

Describe alternatives you've considered

Testing

image

  • Spawn a fridge item

  • Place fridge

  • Plug fridge into a nearby vehicle with battery power

  • Turn fridge on

  • Wait a few hours

  • Vehicle battery is properly depleted

  • Grab appliance

  • Try to move

  • "The fridge collides with ."
    So collision for appliance is bugged but I have no idea how to fix it

Additional context

This only add the infrastructure and the json for the fridge.
What's missing and should happen in other PRs:

  • Something to make a power grid, so I guess some sort of basic vehicle frames that spawns on top of walls
  • All of the other possible appliance
  • And maybe a map rework to replace furnitures with appliances.

@lgtm-com
Copy link

lgtm-com bot commented Sep 1, 2021

This pull request introduces 1 alert when merging 626ba27 into c11072c - view on LGTM.com

new alerts:

  • 1 for Empty branch of conditional

@actual-nh actual-nh added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Vehicles Vehicles, parts, mechanics & interactions labels Sep 1, 2021
@actual-nh actual-nh requested a review from mlangsdorf September 1, 2021 17:29
@PatrikLundell
Copy link
Contributor

I don't understand the description (or, rather, my attempts to do so results in unreasonable functionality):

  • Are you implementing a stationary power grid that's intended for fixed installation exclusively (i.e. not on mobile vehicles)?
  • If so, is the usage of the minifridge just a test case example, as we wouldn't want to lose the ability to actually mount those in vehicles (or find them in vehicles)? In fact, for a stationary implementation I'd want an appliance that isn't "mini" anymore...
  • The "only" wording is confusing, as it seems to imply you can start out with a normal vehicle, but ones you've gotten a single appliance all vehicle functionality development is blocked, and only the power grid/appliance part can grow. If it's a stationary network the concern here is that it seems to exclude adding things like more power generation. Of course, a dedicated power grid might be restricted to grid functionality only, and require power to be carried to it via jumper cables.
  • The frame seems to be a hull part rather than a frame part, which seems to imply you still need a frame to start things off. Wouldn't it make more sense for it to be a special kind of frame that can only support appliances?

@Fris0uman
Copy link
Contributor Author

None of the data in the zip file is meant to go in the game, this is a quick json edit to get things to instal and try

  • Yea an actual fullsize frdge would make more sense
  • You can't start out with a normal vehicle since you can't install appliance on something that doesn't already have appliances. It doesn't exclude anything, we either add an appliance power generator or you make a vehicle generator like now and plug it into the grid with a jumper cable.
  • the frame is a hull because it's a quick copy paste

@Fris0uman Fris0uman changed the title Basic power grid implementation [CR] Basic power grid implementation Sep 3, 2021
@Fris0uman Fris0uman force-pushed the appliance branch 2 times, most recently from 9043453 to 1988e09 Compare September 9, 2021 09:21
@Fris0uman Fris0uman changed the title [CR] Basic power grid implementation [CR] Basic Appliance implementation Sep 9, 2021
@Fris0uman Fris0uman force-pushed the appliance branch 2 times, most recently from cdc506a to 70a5de3 Compare September 11, 2021 17:03
@Fris0uman Fris0uman changed the title [CR] Basic Appliance implementation Basic Appliance implementation Oct 10, 2021
@Fris0uman Fris0uman marked this pull request as ready for review October 10, 2021 09:43
@kevingranade kevingranade merged commit d7af7fc into CleverRaven:master Oct 25, 2021
@Fris0uman Fris0uman deleted the appliance branch October 25, 2021 20:36
UmbralReaper added a commit to UmbralReaper/Cataclysm-DDA that referenced this pull request Jan 13, 2022
With the tailoring overhaul currently in progess in CleverRaven#54256, as well as
appliances being introduced in CleverRaven#51286, I figured this was the best time
to add sewing machines to cause the least amount of churn.

works towards CleverRaven#53647
@UmbralReaper UmbralReaper mentioned this pull request Jan 13, 2022
5 tasks
@dseguin dseguin added the Appliance/Power Grid Anything to do with appliances and power grid label Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Appliance/Power Grid Anything to do with appliances and power grid [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Enhancement / Feature> New features, or enhancements on existing Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants